<script>
	export default {
		onLaunch: function() {
			console.log('App Launch');
			    // #ifdef APP-PLUS
			    // token标志来判断
			    let token= uni.getStorageSync('__token__');
				// let token= '99999999';
			    if (token) {
			        //存在则关闭启动页进入首页
			        plus.navigator.closeSplashscreen();
			    } else {
			        //不存在则跳转至登录页
			        uni.reLaunch({
			            url: "/pages/index/index",
			            success: () => {
			                plus.navigator.closeSplashscreen();
			            }
			        })
			    }
			    // #endif
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
</style>